CREATE TABLE [dbo].[BookItem]
(
[Id] [int] NOT NULL,
[BookId] [int] NULL,
[Code] [nchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Status] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BookItem] ADD CONSTRAINT [PK_BookItem] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BookItem] ADD CONSTRAINT [FK_BookItem_Book] FOREIGN KEY ([BookId]) REFERENCES [dbo].[Book] ([Id])
GO
